/**
 * http://usejsdoc.org/
 * util是一个Node.js核心模块，提供常用函数的集合，用于弥补
 * 核心JavaScript的功能过于简洁的不足
 */
var util = require('util');
function Base(){
	this.name = 'base';
	this.base = 1991;
	this.sayHello = function(){
		console.log('Hello ' + this.name);
	};
}
//prototype 属性使您有能力向对象添加属性和方法
Base.prototype.showName = function(){
	console.log(this.name);
};
function Sub(){
	this.name = 'sub';
}
util.inherits(Sub, Base);
var objBase = new Base();
objBase.showName();
objBase.sayHello();
console.log(objBase);
var objSub = new Sub();
objSub.showName();
//这一行打开注解会报错
//objSub.sayHello();
console.log(objSub);
